# #!coding=utf-8
# from django.http import HttpResponse
# import hashlib
# import sys
# reload(sys)
# sys.setdefaultencoding('utf8')
# def checkSignature(request):
#     signature=request.GET.get('signature',None)
#     timestamp=request.GET.get('timestamp',None)
#     nonce=request.GET.get('nonce',None)
#     echostr=request.GET.get('echostr',None)
#     #这里的token我放在setting，可以根据自己需求修改
#     token='nanjing_lvku'
#     tmplist=[token,timestamp,nonce]
#     tmplist.sort()
#     tmpstr="%s%s%s"%tuple(tmplist)
#     tmpstr=hashlib.sha1(tmpstr).hexdigest()
#     if tmpstr==signature:
#         print echostr
#         return echostr
#     else:
#         print 'error'
#         return HttpResponse("ok")
